From b5532eb9d768fa36d4a5ee92b02a984fef1ac9c8 Mon Sep 17 00:00:00 2001 From: "vhanquez@kneesa.uk.xensource.com" Date: Mon, 20 Feb 2006 17:14:19 +0000 Subject: [PATCH] do not BUG() if memory cannot be allocated, just wait. Signed-off-by: Vincent Hanquez --- linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c index 7cf316644f..dcbccfefb9 100644 --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c @@ -726,8 +726,7 @@ static void blkif_recover(struct blkfront_info *info) int j; /* Stage 1: Make a safe copy of the shadow state. */ - copy = kmalloc(sizeof(info->shadow), GFP_KERNEL); - BUG_ON(copy == NULL); + copy = kmalloc(sizeof(info->shadow), GFP_KERNEL | __GFP_NOFAIL); memcpy(copy, info->shadow, sizeof(info->shadow)); /* Stage 2: Set up free list. */ -- 2.30.2